FROM php:8.1.4-fpm-alpine
LABEL maintainer="Aditya Maulana <adityampc@gmail.com>"
RUN apk update && apk upgrade
RUN apk add openrc --no-cache 
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && sync && install-php-extensions \
    gd \
    xdebug \
    @composer \
    intl \
    mcrypt \
    memcache \
    mysqli \
    xlswriter \
    uuid \
    zip
# Custom php.ini config
COPY php.ini /usr/local/etc/php/php.ini
RUN mkdir /var/www/html/cbt && chmod 777 -R /var/www/html/cbt
RUN mkdir -p /run/openrc 
RUN openrc 
RUN touch /run/openrc/softlevel 